In many industrial, commercial, and scientific applications, a multi-device system has a master device and a plurality of slave devices to operate in a coordinated manner under a command of the master device. For example, to create immersive virtual-reality experience, a plurality of cameras need to collaborate to capture 360-degree panoramic images. An important issue is how the master device (e.g., a controller) controls and coordinates the plurality of cameras to simultaneously conduct a set of operations.
Generally, the master device processes a command (e.g., take a picture) and sends it to a slave device, and the slave device will send a response back to the master device after the picture is taken, so that the master device knows the slave device has finished its work and it can send the command to the next slave device. In this case, if time required to process and send the command to a slave device is T1, and waiting time for receiving the response from the slave device is T2, then a delay time Tdelay for operating each slave device is Tdelay=T1+T2.
If the master device only has one processing thread to control the slave devices, such that the master device will have to wait for the response from one slave device before it could send the command to the next slave device, the total delay time Tdelay for all slave devices can become undesirably large. For example, when the multi-device system has four slave devices, a total delay of the operation is 4×Tdelay. Thus, a total delay of the multi-device system can be unacceptably long, and will moreover increase rapidly with an increasing of the number of slave devices. In this case, the number of the slave devices of the multi-device system will be limited by the delay.
If the master device sends commands to the plurality of slave devices via a plurality of threads respectively, the total delay of the multi-device system will be reduced. Because the plurality of threads work on the commands simultaneously, the total delay of the entire multi-device system is Tdelay, no matter how many slave devices the system has. However, a throughput of the multi-device system may be significantly increased as the number of the threads increases, providing a high computational load on the system.
The apparatuses and methods of this disclosure address the tradeoff between delay time and throughput of a multi-device system.